// 委外工单类型定义

export interface OutsourcingWorkOrderDTO {
  id: number
  workOrderNumber: string
  workOrderName: string
  relatedOutsourcingId: number
  relatedOutsourcingNumber: string
  documentDate: string
  relatedProject: string
  entrustingUnit: string
  contactPerson: string
  contactPhone: string
  responsiblePerson: string
  department: string
  remarks: string
  status: string
  createTime: string
  updateTime?: string
  updateName: string
  itemSummary: string
  productionItems: ProductionItemDisplayDTO[]
  consumeItems: ConsumeItemDisplayDTO[]
  attachments: AttachmentDTO[]
}

export interface OutsourcingWorkOrderAddUpdateDTO {
  id: number
  workOrderNumber: string
  workOrderName: string
  relatedOutsourcingId: number
  relatedOutsourcingNumber: string
  documentDate: string
  relatedProject: string
  entrustingUnit: string
  contactPerson: string
  contactPhone: string
  responsiblePerson: string
  department: string
  remarks: string
  status: string
  createTime: string
  updateTime?: string
  updateName: string
  productionItems: ProductionItemDTO[]
  consumeItems: ConsumeItemDTO[]
  attachments: AttachmentDTO[]
}

export interface OutsourcingWorkOrderShowDTO {
  pageIndex: number
  pageSize: number
  workOrderNumber: string
  workOrderName: string
  relatedOutsourcingNumber: string
  entrustingUnit: string
  contactPerson: string
  status: string
  startDate: string
  endDate: string
}

export interface ProductionItemDTO {
  itemId: number
  plannedQuantity: number
  remark: string
}

export interface ConsumeItemDTO {
  itemId: number
  warehouseId: string
  plannedQuantity: number
  number: number
  remark: string
}

export interface ProductionItemDisplayDTO extends ProductionItemDTO {
  itemCode: string
  itemName: string
  specification: string
  unit: string
  itemType: string
  brand: string
  inventory: number
  purchasePrice: number
  salePrice: number
  manufacturerModel: string
}

export interface ConsumeItemDisplayDTO extends ConsumeItemDTO {
  itemCode: string
  itemName: string
  specification: string
  unit: string
  itemType: string
  brand: string
  inventory: number
  purchasePrice: number
  salePrice: number
  manufacturerModel: string
}

export interface AttachmentDTO {
  id: number
  fileName: string
  originalFileName: string
  fileSize: number
  fileType: string
  fileExtension: string
  fileUrl: string
  filePath: string
  uploadDate: string
  uploadBy: string
  entityType: string
  entityId: number
  description: string
}

export interface ItemDTO {
  id: number
  itemCode: string
  itemName: string
  specification: string
  unit: string
  itemType: string
  itemClassification: string
  brand: string
  inventory: number
  purchasePrice: number
  salePrice: number
  manufacturerModel: string
}

export interface OutsourcingProcessingDTO {
  id: number
  productionOrderNumber: string
  productionTheme: string
  documentDate: string
  productionType: string
  relatedProject: string
  department: string
  entrustingUnit: string
  contactPhone: string
  contactPerson: string
  responsiblePerson: string
  salesOrderId: number
  remarks: string
  status: string
  createTime: string
  updateTime?: string
  updateName: string
}

export interface OutsourcingProcessingShowDTO {
  pageIndex: number
  pageSize: number
  productionOrderNumber: string
  productionTheme: string
  entrustingUnit: string
  contactPerson: string
  status: string
  startDate: string
  endDate: string
}

export interface ItemShowDTO {
  pageIndex: number
  pageSize: number
  searchText: string
  itemType: string
  itemClassification: string
  inventoryStatus: string
}

export interface UpdateStatusRequestDTO {
  id: number
  status: string
}

// API响应类型
export interface APIResponse<T> {
  code: number
  message: string
  data: T
}

export interface APIPageing<T> {
  pageData: T[]
  totalCount: number
  pageIndex: number
  pageSize: number
}

